package com.shi.entity;

import com.alibaba.fastjson.JSONObject;

/**
 * lunyu实体类
 * 
 * @author 
 *
 */
public class Lunyu {
	/***/
	private Integer id; 
	/***/
	private String chapter; 
	/***/
	private String content; 
	/**
	 * 实例化
	 */
	public Lunyu() {
		super();
	}
	
	/**
	 * 将当前对象转换为JsonObject
	 * 
	 * @return
	 */
	public JSONObject toJson() {
		JSONObject result = new JSONObject();
		if (this.getId() != null) {
			result.put("id",this.getId());
		}
		if (this.getChapter() != null) {
			result.put("chapter",this.getChapter());
		}
		if (this.getContent() != null) {
			result.put("content",this.getContent());
		}
		return result;
	}
	
	
	/**
	 * 获取id
	 * 
	 * @return
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * 设置id
	 * 
	 * @param id
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	
	/**
	 * 获取chapter
	 * 
	 * @return
	 */
	public String getChapter() {
		return chapter;
	}

	/**
	 * 设置chapter
	 * 
	 * @param chapter
	 */
	public void setChapter(String chapter) {
		this.chapter = chapter;
	}
	
	/**
	 * 获取content
	 * 
	 * @return
	 */
	public String getContent() {
		return content;
	}

	/**
	 * 设置content
	 * 
	 * @param content
	 */
	public void setContent(String content) {
		this.content = content;
	}

	@Override
	public String toString() {
		return "Lunyu [id=" + id + " , chapter=" + chapter + " , content=" + content + "  ]";
	
	}
	
	
}
